package study.java.thread01;


/**
* @Name: ThreadJoinDemo
* @Description: 线程加入测试类调用类
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-1-8 下午8:57:10 
* @Version: V1.0
 */
public class ThreadJoinDemo {
	
	public static void main(String[] args) throws InterruptedException {
		MyThread t01 = new MyThread() ;
		MyThread t02 = new MyThread() ;
		MyThread t03 = new MyThread() ;
		t01.setName("孙悟空") ;
		t02.setName("组八戒") ;
		t03.setName("沙和尚") ;
		t01.start() ;
		//线程加入：public final void join()	等待该线程终止
		t01.join() ;
		t02.start() ;
		t03.start() ;
	}

}
